package top.fangw.common.core.util;

import com.alibaba.fastjson.JSON;
import com.github.f4b6a3.ulid.Ulid;
import com.github.f4b6a3.ulid.UlidCreator;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.event.SpringApplicationEvent;
import org.springframework.context.ApplicationContext;

/**
 * @description:
 * @author: fgw
 * @createDate: 2024/2/26
 */
@Slf4j
public class TenantIdUtil {

    public static void main(String[] args) {
        Ulid ulid = UlidCreator.getUlid();
        String string = ulid.toString();
        Ulid monotonicUlid = UlidCreator.getMonotonicUlid();
        String string1 = monotonicUlid.toString();
        System.out.println("string1.length() = " + string1.length());
        System.out.println("string.length() = " + string.length());
        System.out.println("string1 = " + string1.toLowerCase());
        System.out.println("string = " + string.toLowerCase());
    }


}
